﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FortuneHeavan.Game.DAL;
using FortuneHeavenCommon.DataMap;
using Jzy.Core.Common;
using FortuneHeavenDAL;

namespace FortuneHeavenBAL
{
    public class UserSpreadBO : CommonOperate<UserSpread>
    {
        public UserSpreadDAL _acountDAL;
          public UserSpreadBO()
            : base()
        {
            _acountDAL = new UserSpreadDAL();
        }
      
        public List<UserSpread> GetUserSpreads(int page, int size, int type, int userid)
        {
            return _acountDAL.GetUserSpreads( page,  size,  type,  userid);
        }
        public int GetTotalSize(int type, int userid)
        {
            return _acountDAL.GetTotalSize(type, userid);
        }

        public List<SpreadListSta> GetUserSpreadsSta(int page, int size, string acount)
        {
            if (acount != null && acount.Contains(';'))
            {
                return new List<SpreadListSta>();
            }
            if (acount != null && acount.Trim() == "")
            {
                acount = acount.Trim();
            }
            return _acountDAL.GetUserSpreadsSta(page, size, acount);
        }
        public int GetTotalSizeSta(string acount)
        {
            if (acount != null && acount.Contains(';'))
            {
                return 0;
            }
            if (acount != null && acount.Trim() == "")
            {
                acount = acount.Trim();
            }
            return _acountDAL.GetTotalSizeSta( acount);
        }
    }
}
